package com.xxpt.model.sys;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * SysArea
 * @Author 思想天下 - liuyanling - 2020/02/25 11:18
 */
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SysArea implements Serializable {

    /*
     * 唯一标识 
     */
    private Integer id;	
    /*
     * 父级id 
     */
    private Integer parentId;	
    /*
     * 地区名称 
     */
    private String areaName;	
    /*
     * 区域代码 
     */
    private String zoneCode;	
    /*
     * 地区编码 
     */
    private String zipCode;	
    /*
     * 状态（0删除,1正常，2禁用） 
     */
    private Integer status;	
    /*
     * 简写 
     */
    private String code;	
    /*
     * 级别 
     */
    private Integer lev;	
    /*
     * 创建时间 
     */
    private Date createTime;	
    /*
     * 简拼首字母 
     */
    private String shortEn;/*
     * 简拼首字母
     */
    private String sortCode;


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SysArea sysArea = (SysArea) o;
        return Objects.equals(id, sysArea.id) &&
                Objects.equals(parentId, sysArea.parentId) &&
                Objects.equals(areaName, sysArea.areaName) &&
                Objects.equals(zoneCode, sysArea.zoneCode) &&
                Objects.equals(zipCode, sysArea.zipCode) &&
                Objects.equals(status, sysArea.status) &&
                Objects.equals(code, sysArea.code) &&
                Objects.equals(lev, sysArea.lev) &&
                Objects.equals(createTime, sysArea.createTime) &&
                Objects.equals(shortEn, sysArea.shortEn) &&
                Objects.equals(sortCode, sysArea.sortCode);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, parentId, areaName, zoneCode, zipCode, status, code, lev, createTime, shortEn, sortCode);
    }

    public String getSortCode() {
        return sortCode;
    }

    public void setSortCode(String sortCode) {
        this.sortCode = sortCode;
    }

    public SysArea setId(Integer id){
        this.id = id;
        return this;
    }	

    public Integer getId(){
        return this.id;
    }	

    public SysArea setParentId(Integer parentId){
        this.parentId = parentId;
        return this;
    }	

    public Integer getParentId(){
        return this.parentId;
    }	

    public SysArea setAreaName(String areaName){
        this.areaName = areaName;
        return this;
    }	

    public String getAreaName(){
        return this.areaName;
    }	

    public SysArea setZoneCode(String zoneCode){
        this.zoneCode = zoneCode;
        return this;
    }	

    public String getZoneCode(){
        return this.zoneCode;
    }	

    public SysArea setZipCode(String zipCode){
        this.zipCode = zipCode;
        return this;
    }	

    public String getZipCode(){
        return this.zipCode;
    }	

    public SysArea setStatus(Integer status){
        this.status = status;
        return this;
    }	

    public Integer getStatus(){
        return this.status;
    }	

    public SysArea setCode(String code){
        this.code = code;
        return this;
    }	

    public String getCode(){
        return this.code;
    }	

    public SysArea setLev(Integer lev){
        this.lev = lev;
        return this;
    }	

    public Integer getLev(){
        return this.lev;
    }	

    public SysArea setCreateTime(Date createTime){
        this.createTime = createTime;
        return this;
    }	

    public Date getCreateTime(){
        return this.createTime;
    }	

    public SysArea setShortEn(String shortEn){
        this.shortEn = shortEn;
        return this;
    }	

    public String getShortEn(){
        return this.shortEn;
    }	


	@Override
    public String toString() {
        return "{" +
				"id:" + id + "" +
				" , parentId:" + parentId + "" +
				" , areaName:" + areaName + "" +
				" , zoneCode:" + zoneCode + "" +
				" , zipCode:" + zipCode + "" +
				" , status:" + status + "" +
				" , code:" + code + "" +
				" , lev:" + lev + "" +
				" , createTime:" + createTime + "" +
				" , shortEn:" + shortEn + "" +
               '}';
    }
}
